package com.bkhc.common.api;

import com.bkhc.common.annotation.ApiOperation;
import com.bkhc.common.annotation.ApiPackage;
import com.bkhc.common.annotation.AuditLog;
import com.bkhc.common.enu.OperationEnum;
import com.bkhc.common.service.LookupService;
import com.bkhc.common.util.response.ResultJson;
import io.swagger.annotations.Api;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

/**
 * @author pcq
 * @date 2021/6/20 17:57
 */
@RestController
@RequestMapping("/lookup")
@Api("后台管理lookup服务接口")
@ApiPackage(code="lookup",name="后台管理lookup服务接口",description = "后台管理lookup服务接口")
public class LookupController extends CommonController {

    @Autowired
    private LookupService lookupSerivce;
    @ApiOperation(code="queryItemByClass",name="按类型查询lookup",description = "按类型查询lookup",type = "common")
    @AuditLog(object="lookup",operation = "按类型查询lookup",type = OperationEnum.query)
    @RequestMapping(path = "/queryItemByClass",method = RequestMethod.GET)
    public ResultJson<?> queryItemByClass(@RequestParam(name="classItem") String classItem) {
        ResultJson<?> res = lookupSerivce.queryItemByClass(classItem);
        return res;
    }
}
